/**
 * 
 */
package com.mh.web.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author jsalazar
 * 
 */
public class DateUtils {

	private static final SimpleDateFormat dateFormat = new SimpleDateFormat(
			"dd-MM-yyyy");

	public static final String convertToString(Date dateInput) {

		try {
			String dt = dateFormat.format(dateInput);
			return dt;

		} catch (Exception e) {
			return "";

		}

	}

	public static final Date convertToDate(String dateInput) {

		try {
			Date dt = dateFormat.parse(dateInput);
			return dt;

		} catch (Exception e) {
			return null;

		}

	}

}
